package br.com.abril.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

import br.com.abril.booking.BookingLoader;
import br.com.abril.booking.PrevisionLoader;

@Component
public class DownloadFineshedListener implements ApplicationListener<DownloadFineshedEvent> {

	@Autowired
	private BookingLoader loader;

	@Autowired
	private PrevisionLoader previsionLoader;
	
	@Override
	public void onApplicationEvent(DownloadFineshedEvent event) {
	
		loader.load();
		
		previsionLoader.load();
		
	}

}
